#pragma once

namespace Test {

typedef ::boost::shared_ptr<Output> OutputPtr;
class ErrorCountOutput;
typedef ::boost::shared_ptr<ErrorCountOutput> ErrorCountOutputPtr;
class ErrorCountOutput : public Output
{
public:
	ErrorCountOutput(OutputPtr child);
	~ErrorCountOutput(void);

	int getErrorCount(void);

	HtmlOutput* getHtmlOutput(void);
	CompilerOutput* getCompilerOutput(void);

	virtual void initialize(int tests);
	virtual void finished(int tests, const Time& time);
	virtual void suite_start(int tests, const std::string& name);
	virtual void suite_end(int tests, const std::string& name, const Time& time);
	virtual void test_start(const std::string& name);
	virtual void test_end(const std::string& name, bool ok, const Time& time);
	virtual void assertment(const Source& s);

private:
	OutputPtr child_;
	int errorCount_;
};

}